//package com.vast.framework.config;
//
//import com.alibaba.fastjson.serializer.SerializerFeature;
//import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
//import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.http.MediaType;
//import org.springframework.http.converter.HttpMessageConverter;
//
//import java.util.ArrayList;
//import java.util.List;
//
//@Configuration
//public class FastJsonConfig {
//
//	@Bean
//	public HttpMessageConverters fastJsonHttpMessageConverters() {
//		FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter();
//		com.alibaba.fastjson.support.config.FastJsonConfig fastJsonConfig = new com.alibaba.fastjson.support.config.FastJsonConfig();
//		fastJsonConfig.setSerializerFeatures(SerializerFeature.PrettyFormat,
//				SerializerFeature.WriteNullStringAsEmpty,
//				SerializerFeature.WriteNullNumberAsZero,
//				SerializerFeature.WriteNullListAsEmpty,
//				SerializerFeature.WriteDateUseDateFormat,
//				SerializerFeature.WriteMapNullValue);
//		fastJsonConfig.setDateFormat("yyyy-MM-dd HH:mm:ss");
//		fastConverter.setFastJsonConfig(fastJsonConfig);
//		List<MediaType> mediaTypes = new ArrayList<>();
//		mediaTypes.add(MediaType.APPLICATION_JSON);
//		mediaTypes.add(MediaType.APPLICATION_JSON_UTF8);
//		mediaTypes.add(MediaType.TEXT_PLAIN);
//		fastConverter.setSupportedMediaTypes(mediaTypes);
//		HttpMessageConverter<?> converter = fastConverter;
//		return new HttpMessageConverters(converter);
//	}
//}
